package server

import "net/http"

// Server 定义一个服务的接口
type Server interface {

	// Route http请求的路由地址
	Route(pattern string, handler http.HandlerFunc)
	// RouteWithContext 对Route方法的重构，将context的创建封装到server 框架中
	RouteWithContext(pattern string, handlerFunc func(c *HttpContext))

	RouteWithVo(pattern string, handlerFunc func(req RequestBody))
	// Start 启动方法
	Start(port string) error
}

type ContextHandlerFunc func(c *HttpContext)
